package com.zhima.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhima.dto.UserDTO;
import com.zhima.enums.ContestType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ContestShowVO {
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    private String title;
    private ContestType type;
    private Date beginTime;
    private Date endTime;
    // 单位是分钟
    private Long duration;
    private String holderName;
    private String holderId;
    private String description;

    private Boolean isBegin;
    // 是否是登录用户创建的比赛
    private Boolean isSelf;
    // 登录用户是否报名
    private Boolean isApply;
    // 比赛是否结束
    private Boolean isEnd;
    // 以下两个属性是只有比赛开始后才可以查看
    private ContestQuestionVO[] contestQuestions;
    // 本场比赛的题目FAC榜
    private Map<ContestQuestionVO, UserDTO> questionFirstAcMap;
}
